// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';
import { transformValue } from '@/utils';
import { model } from './usr-0309527282-form-model';

export class FormControlVO extends ControlVOBase {
	constructor(data: any) {
		//  表单预置字段
		data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
		data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
		super(data);
		//  表单自持属性
		this.$ownKeys = [
			'srfupdatedate',
			'srforikey',
			'srfkey',
			'srfmajortext',
			'srftempmode',
			'srfuf',
			'srfdeid',
			'srfsourcekey',
			'id',
			'name',
			'authority',
			'workflow_group',
			'group_scope',
			'description',
			'granted_authorities',
			'deploy_system_id',
		];
	}
	get srfupdatedate() {
		return this.$DO.update_time;
	}
	set srfupdatedate(value: any) {
		this.$DO.update_time = value;
	}
	get srfkey() {
		return this.$DO.id;
	}
	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfmajortext() {
		return this.$DO.name;
	}
	set srfmajortext(value: any) {
		this.$DO.name = value;
	}
	get id() {
		return this.$DO.id;
	}
	set id(value: any) {
		this.$DO.id = value;
	}
	get name() {
		return this.$DO.name;
	}
	set name(value: any) {
		this.$DO.name = value;
	}
	get authority() {
		return this.$DO.authority;
	}
	set authority(value: any) {
		this.$DO.authority = value;
	}
	get workflow_group() {
		return this.$DO.workflow_group;
	}
	set workflow_group(value: any) {
		this.$DO.workflow_group = value;
	}
	get group_scope() {
		return this.$DO.group_scope;
	}
	set group_scope(value: any) {
		this.$DO.group_scope = value;
	}
	get description() {
		return this.$DO.description;
	}
	set description(value: any) {
		this.$DO.description = value;
	}
	get deploy_system_id() {
		return this.$DO.deploy_system_id;
	}
	set deploy_system_id(value: any) {
		this.$DO.deploy_system_id = value;
	}
	// 界面主键标识
	get sys_role() {
		return this.$DO.id;
	}

	set sys_role(value: any) {
		this.$DO.id = value;
	}

	//  工作流预置字段
	srfwfmemo: any;
	srffrontuf: any;

	//  无实体属性表单项
	get srftempmode() {
		return this.$DO.srftempmode;
	}

	set srftempmode(value: any) {
		this.$DO.srftempmode = value;
	}
	get granted_authorities() {
		return this.$DO.granted_authorities;
	}

	set granted_authorities(value: any) {
		this.$DO.granted_authorities = value;
	}

	//  表单重复器

	/**
	 * 返回后台数据
	 *
	 * @return {*}
	 * @memberof FormControlVO
	 */
	public getDo() {
		return {
			srffrontuf: this.srffrontuf,
			id: this.$DO.id,
			name: this.$DO.name,
			authority: this.$DO.authority,
			workflow_group: this.$DO.workflow_group,
			group_scope: this.$DO.group_scope,
			description: this.$DO.description,
			deploy_system_id: this.$DO.deploy_system_id,
			update_time: this.$DO.update_time,
			granted_authorities: this.granted_authorities,
		};
	}
}
